package com.dtx.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class BCryptPasswordEncoderUtils {

    private static BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
    public static String encodingPassword(String password){
        return bCryptPasswordEncoder.encode(password);
    }

    public static void main(String[] args) {
        String password="admin";
        String pwd = encodingPassword(password);
        System.out.println(pwd);
        //$2a$10$jWAf7dd.CRxhnJpYuTvPtuZVTmMD5/6fWBncTFhBCT/lKlVHjZuUu
        //$2a$10$Xptl4w.h8q.8bpZ0HppC.uqQnXYf.oILqrN2KFqWC4.1tHgg6tB6u
    }
}
